import request from "@/utils/request";
import qs from "qs";

let userIdApi =
  process.env.VUE_APP_BUILDENV == "yzj"
    ? "/projectmanage_service/projectManageInter/interface_useridlist_query.shtml"
    : "/projectmanage_service/projectManageInter/interface_useridlistbycode_query.shtml";
export function getUserIdList(data) {
  return request({
    url: process.env.VUE_APP_URL1 + userIdApi,
    method: "post",
    data: qs.stringify(data)
  });
}

export function login(data) {
  return request({
    url: "/user/login",
    method: "post",
    data
  });
}

export function getInfo(token) {
  return request({
    url: "/user/info",
    method: "get",
    params: { token }
  });
}

export function logout() {
  return request({
    url: "/user/logout",
    method: "post"
  });
}
